<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<title>登录</title>


		<script src="js/jquery-1.2.6.min.js" type=text/javascript></script>
		<script src="js/formValidator_min.js" type="text/javascript"
			charset="UTF-8"></script>
		<script src="js/formValidatorRegex.js" type="text/javascript"
			charset="UTF-8"></script>
		<script type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
		<script type="text/javascript" src="js/jquery.XYTipsWindow.min.2.8.js"></script>
		<script type="text/javascript">
	      function changeImage(){
 		    var timenow = new Date().getTime();  
 			 document.getElementById("imc").disabled=true;
  			 document.getElementById("imc").src="http://localhost:8080/easyshop/randomcode?act=genCode&d="+timenow;
  		  }
  		  
		</script>
		<script type="text/javascript">
		 $(document).ready(function() {
			
			$("#cancel1").click(function(){
				alert("ddd");
				parent.$.XYTipsWindow.removeBox();
				
			});

		
		 $.formValidator.initConfig({formid:"form1",debug:false,submitonce:true,
				onerror:function(msg,obj,errorlist){
					//$.map(errorlist,function(msg1){alert(msg1)});
					alert(msg);
				}
			});
			$("#t_UserName").formValidator({onshow:"5-10个字符",onfocus:"5-10个字符",oncorrect:"该用户名可以注册"}).inputValidator({min:5,max:10,onerror:"输入有误"}).regexValidator({regexp:"username",datatype:"enum",onerror:"格式有误"});
			$("#iptNickName").formValidator({onshow:"至少4个字符",onfocus:"至少4个字符",oncorrect:"通过"}).inputValidator({min:4,empty:{leftempty:false,rightempty:false,emptyerror:"输入有误"},onerror:"输入有误"});
			$("#t_UserPass").formValidator({onshow:"至少6个字符",onfocus:"至少6个字符",oncorrect:"密码合法"}).inputValidator({min:6,empty:{leftempty:false,rightempty:false,emptyerror:"输入有误"},onerror:"输入有误"});
			$("#t_RePass").formValidator({onshow:"请再次输入密码",onfocus:"请再次输入密码",oncorrect:"密码一致"}).inputValidator({min:6,empty:{leftempty:false,rightempty:false,emptyerror:"输入有误"},onerror:"输入有误"}).compareValidator({desid:"t_UserPass",operateor:"=",onerror:"密码不一致"});	
			$("#iptName").formValidator({onshow:"至少4个字符",onfocus:"至少4个字符",oncorrect:"通过"}).inputValidator({min:4,empty:{leftempty:false,rightempty:false,emptyerror:"输入有误"},onerror:"输入有误"});
			$("#iptCard").formValidator({onshow:"15或18位的身份证",onfocus:"15或18位的身份证",oncorrect:"输入正确"}).functionValidator({fun:isCardID});
			$("#t_Email").formValidator({onshow:"6-100个字符",onfocus:"6-100个字符",oncorrect:"恭喜你,你输对了",defaultvalue:"@"}).inputValidator({min:6,max:100,onerror:"长度非法"}).regexValidator({regexp:"^([\\w-.]+)@(([[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.)|(([\\w-]+.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(]?)$",onerror:"格式不正确"});
		});
		function test1(obj)
		{
			if(obj.value=="全角字符当做1个长度")
			{
				$.formValidator.getInitConfig("1").wideword = false;
				obj.value = "全角字符当做2个长度";
			}
			else
			{
				$.formValidator.getInitConfig("1").wideword = true;
				obj.value = "全角字符当做1个长度";
			}
			
		}

</script>
		<style type="text/css">
body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,form,fieldset,legend,button,input,textarea,th,td
	{
	margin: 0;
	padding: 0
}

body,button,input,select,textarea {
	font: 12px/ 1.5 tahoma, arial, \5b8b\4f53, sans-serif;
	text-align: justify;
	text-justify: inter-ideograph;
	word-break: break-all;
	word-wrap: break-word
}

h1,h2,h3,h4,h5,h6 {
	font-size: 100%
}

address,cite,dfn,em,var,i,u {
	font-style: normal
}

code,kbd,pre,samp {
	font-family: courier new, courier, monospace
}

small {
	font-size: 12px
}

ul,ol {
	list-style: none
}

sup {
	vertical-align: text-top
}

sub {
	vertical-align: text-bottom
}

legend {
	color: #000
}

fieldset,img {
	border: 0
}

button,input,select,textarea {
	font-size: 100%;
	padding: 0;
	margin: 0
}

table {
	border-collapse: collapse;
	border-spacing: 0
}

caption,th {
	text-align: left
}

.ovh {
	overflow: hidden
}

.l {
	float: left
}

.r {
	float: right
}

.cur {
	cursor: pointer
}

.c_b {
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
	zoom: 1;
	font-size: 0px;
	overflow: hidden;
	visibility: hidden
}

.c_b2 {
	clear: both
}

.dn {
	display: none
}

.dis {
	display: block
}

.b {
	font-weight: bold
}

body {
	behavior: url("css/hover_htc.htc");
	font-family: "Microsoft YaHei", 宋体;
	color: #333;
}  /*hover*/ /*用户登录*/
.content {
	width: 1200px;
	margin: 0 auto;
	margin-top: 25px;
	background: #f7f7f7;
	height: 565px;
}

.login {
	width: 1060px;
	margin: 0 auto;
}

/*左侧代码*/
.login01 {
	width: 660px;
	height: 549px;
	float: left;
	background: url(images/ulogin_bg.jpg) no-repeat left top;
	margin-top: 15px;
}

.login01_text {
	padding-left: 97px;
	padding-top: 340px;
	float: left;
}

.login01_text01 {
	width: 261px;
	padding-bottom: 12px;
	float: left;
	line-height: 22px;
	color: #a6dcc8;
	font-size: 12px;
}

.login01_text01 span {
	width: 261px;
	float: left;
	color: #dfe27c;
	font-family: "微软雅黑";
	font-size: 16px;
}

/*============================右侧代码===================================*/
.login02 {
	width: 350px;
	float: left;
	padding-top: 20px;
	padding-left: 20px;
}

.login0201 {
	width: 350px;
	float: left;
	height: 19px;
}

.login0202 {
	width: 350px;
	float: left;
	background: url(images/y6.jpg) repeat-y left top;
	height: 450px;
}

.login0202_text {
	width: 310px;
	float: left;
	margin-left: 30px;
	padding-top: 15px;
	display: inline;
	color: #2791e3;
	font-size: 18px;
	font-family: "微软雅黑";
}

.login0202_text1 {
	width: 298px;
	float: right;
	padding-left: 45px;
}

.login0202_text1 h1 {
	float: left;
	padding-right: 10px;
	line-height: 26px;
}

.login0202_text1 h2 {
	float: left;
}

.login0202_text1 h3 {
	width: 80%;
	padding-left: 16%;
	float: left;
	height: 24px;
	line-height: 24px;
	color: #FF0000;
}

.login0202_text1 h3 span {
	width: 20px;
	float: left;
	padding-right: 5px;
	padding-top: 4px;
}

.login0202_text1input {
	width: 205px;
	padding-left: 5px;
	height: 24px;
	border: #dadada solid 1px;
	line-height: 24px;
	background: #fff;
}

.login0202_text1input2 {
	width: 205px;
	padding-left: 5px;
	height: 24px;
	border: #FEA710 solid 1px;
	line-height: 24px;
	background: #fff;
}

.login0202_text1btn {
	width: 90px;
	height: 29px;
	text-align: center;
	border: none;
	background: #2791e3;
	color: #fff;
	font-size: 16px;
	font-family: "微软雅黑";
	line-height: 29px;
	cursor: pointer;
}

.login0202_text2 {
	width: 200px;
	float: left;
	padding-left:50px;
	padding-top: 35px;
}

.login0202_text2 h1 {
	float: left;
	padding-right: 20px;
}

.login0202_text2 h2 {
	float: left;
	color: #2791e3;
	font-size: 12px;
	line-height: 28px;
	width: 90px;
}

.login0202_text2 h2 a {
	color: #2791e3;
	font-size: 12px;
	text-decoration: none;
}

.login0202_text2 h2 a:hover {
	color: #2791e3;
	font-size: 12px;
	text-decoration: underline;
}

.login0202_text3 {
	width: 306px;
	float: left;
	margin-left: 22px;
	display: inline;
	margin-top: -200px;
	background: url(images/y10.jpg) repeat-x top left;
}

.login0202_text301 {
	width: 270px;
	float: left;
	margin-top: 12px;
	line-height: 20px;
	padding-left: 8px;
}

.login0202_text301 samp {
	color: #ff5a00;
	font-size: 16px;
	font-family: "微软雅黑";
	line-height: 30px;
}

.login0202_text302 {
	width: 260px;
	float: left;
	line-height: 20px;
	padding-left: 23px;
	padding-top: 5px;
}

.login0202_text302 span {
	padding-left: 12px;
	color: #2791e3;
	font-size: 12px;
}

.login0202_text302 span a {
	color: #2791e3;
	font-size: 12px;
	text-decoration: none;
}
</style>

	</head>

	<body>
		<div class="content">
			<div class="login">

				<!--[if !IE]>左侧<![endif]-->

				<div class="login01">
					<div class="login01_text">
						<div class="login01_text01">
							<span>行货正品</span> 全部商品保证行货正品，您可放心购物
						</div>
						<div class="login01_text01">
							<span>正规发票</span> 全部商品均可提供正规商业发票
						</div>
						<div class="login01_text01">
							<span>当日发货</span> 商品购买后当天发货，部分地区24小时内到货
						</div>
						<div class="login01_text01">
							<span>七天包退</span> 购买七天之内可无理由退货
						</div>
					</div>
				</div>

				<!--登录开始-->
				<div class="login02">
					<div class="login0201">
						<img src="images/y4.jpg" />
					</div>
					<div class="login0202">

						<form action="<c:url value="frontSecurityMgr?act=login"/>"
							name="form1" id="form1" method="post">
							<div class="login0202_text">
								用户登录
							</div>
							<div class="login0202_text1"
								style="padding-top: 20px; height: 30px;">

							
									<div style="height: 17px; overflow: hidden"></div>
									
										<span class="title">登录账号：</span>
										<input class="reg_input" value="${userName }"name="user_name" id="t_UserName"
											type="text" />
										<span id="t_UserNameTip" class="onshow"></span>
									
                            </div>
							<div class="login0202_text1"
								style="padding-top: 20px; height: 30px;">
									
											<span class="title">登录密码：</span>
											<input class="reg_input" id="t_UserPass" name="user_pwd"
												type="password" />
											<span id="t_UserPassTip" class="onshow"></span>
									
							</div>
							<div class="login0202_text1"
								style="padding-top: 2px; height: 40px;">
									  <span style="font-size:12px;"class="title">验证码: &nbsp&nbsp&nbsp&nbsp&nbsp</span>
					         			 <input class="reg_input" type="text" name="checkkey" id="checkkey"  maxlength="4"/><br/>
					         			 <img src="http://localhost:8080/easyshop/randomcode?act=genCode" id="imc" style="margin-left:65px;margin-top:4px;"onload="ch.disabled=false;"/>
					         			 <a href="javascript:onclick=changeImage();" id="imc">看不清,换一张</a>
							</div>
							
								<div class="login0202_text2">
									<h1>
										<input name="" type="submit" class="login0202_text1btn"
											value="登录" />
									</h1>
									<h2>
										<a href="#">忘记密码</a>
									</h2>
									<!-- forgotPassword.html -->
								</div>

							 <c:if test="${not empty error}">
						            <script type="text/javascript">
						              alert("${error}");
						          //     setTimeOut(function(){
						           //       location.href="http://www.baidu.com";
						            //   },3000);
						               
						            </script>
						     </c:if>
						     <c:if test="${not empty regok}">
						            <script type="text/javascript">
						               alert('${regok}');
						               
						            </script>
						     </c:if>
						</form>
					</div>

					<div class="login0202_text3">
						<div class="login0202_text301">
							<samp>
								还不是小麦铺用户？
							</samp>
						</div>
						<div class="login0202_text302">
							现在免费注册小麦铺用户，便能立即享
							<br />
							受便宜又放心的购物乐趣!
							<span><a href="<c:url value="frontUserMgr?act=toRegister"/>">用户注册</a> </span>
						</div>
					</div>
					<!--登录结束-->
				</div>
			</div>
	</body>
</html>
